package com.example.JavaDemo.service.impl;



import java.util.List;

import com.example.JavaDemo.Mapper.CommunityMapper;
import com.example.JavaDemo.domain.Community;
import com.example.JavaDemo.service.ICommunityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CommunityServiceImpl  implements ICommunityService {
    @Autowired
    private CommunityMapper communityMapper;

    /**
     * 查询社区
     * @param community
     * @return
     */
    @Override
    public List<Community> selectCommunity(Community community) {
        return communityMapper.selectCommunity(community);
    }

    /**
     * 新增社区
     * @param community
     */
    @Override
    public void insertCommunity(Community community){communityMapper.insertCommunity(community);}

    /**
     * 修改社区
     * @param community
     */
    @Override
    public void updateCommunityById(Community community) {
        communityMapper.updateCommunityById(community);
    }

    /**
     * 删除社区
     * @param id
     */
    @Override
    public void delCommunityById(String id) {
        communityMapper.delCommunityById(id);
    }
}
